package designPattern.state.vote2.state;

import designPattern.state.vote2.VoteManager;
import designPattern.state.vote2.VoteState;

public class RepeatVoteState implements VoteState {

	@Override
	public void vote(String user, String voteItem, VoteManager manager) {
		System.out.println("请不要重复投票。");
		if (manager.getMapVoteCount().get(user) >= 4) {
			manager.getMapState().put(user, new SpiteVoteState());
		}
	}
}
